<?php
/**
 *
 *
 */
namespace Yz\modules\Users;
class Controller_Logout
    extends \Yz_Controller_Templated
    implements \Yz_Controller_Interface
{

    public function go( \Yz_Router_Interface $router )
    {
        debug();
        $this->router = $router;
        $user = \Yz::selectLibrary('user');
        $user->logout();

        $url = $router->getWebPrefix();

        $template = $this->selectTemplate();
        $template->url = $url;
        $this->getView()
            ->setRedirect( $url )
            ;
        return $this->outputTemplate($template);
    }


}
